<?php

namespace Modules\ApiAdmin\Database\Seeders;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class AuthsTableSeeder extends Seeder
{
    /**
     * php artisan module:seed Admin
     *
     * @return void
     */
    public function run()
    {
		
		/*          api管理                    */
		
		
		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin',
			'title'=>'api管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-key2',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin.apis.phone',
			'title'=>'手机号查询',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'api_admin.apis.phone_store',
			'title'=>'手机号查询数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin.apis.ip',
			'title'=>'IP查询',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'api_admin.apis.ip_store',
			'title'=>'IP查询数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin.apis.idcard',
			'title'=>'身份证查询',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'api_admin.apis.idcard_store',
			'title'=>'身份证查询数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin.apis.qq',
			'title'=>'QQ测吉凶',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'api_admin.apis.qq_store',
			'title'=>'QQ测吉凶数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin.apis.zcgjj',
			'title'=>'重仓股基金',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'api_admin.apis.zcgjj_store',
			'title'=>'重仓股基金数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'api_admin.apis.purch',
			'title'=>'暂停基金',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'api_admin.apis.purch_store',
			'title'=>'暂停基金数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
    }
}
















